package com.kucan.recyclecard.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;


import com.kucan.recyclecard.activitys.MainActivity;
import com.kucan.recyclecard.application.MyApplication;
import com.kucan.recyclecard.base.BaseActivity;
import com.kucan.recyclecard.core.ActionCallbackListener;
import com.kucan.recyclecard.core.AppAction;

import java.util.List;

public class RouteUtil {

    /**
     * 去外部浏览器
     * @param mActivity
     * @param url 跳转链接
     */
    public static void toBrowser(BaseActivity mActivity, String url) {
        Uri uri = Uri.parse(url);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        mActivity.startActivity(intent);
    }

    /**
     * 去拨号
     * @param mActivity
     * @param number 电话号
     */
    public static void toCallPhone(BaseActivity mActivity, String number) {
        Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + number));
        mActivity.startActivity(dialIntent);
    }


}
